﻿using System.Globalization;
namespace Localization.Repository.Models
{
    public class ResourceValue
    {
        //#region constructors

        //public ResourceValue() { }

        //public ResourceValue(ResourceKey resourceKey, ResourceCulture culture, string value)
        //    : this(0, resourceKey, culture, value, null) { }

        //public ResourceValue(int id, ResourceKey resourceKey, ResourceCulture culture, string value)
        //    : this(id, resourceKey, culture, value, null) { }

        //public ResourceValue(
        //    int id,
        //    ResourceKey resourceKey,
        //    ResourceCulture culture,
        //    string value,
        //    string comment)
        //{
        //    this.ResourceValueID = id;
        //    this.ResourceKey = resourceKey;
        //    this.Culture = culture;
        //    this.Value = value;
        //}

        //#endregion

        #region public properties

        /// <summary>
        /// Gets or Sets the resource key ID.
        /// </summary>
        public virtual int ResourceValueID { get; set; }
        /// <summary>
        /// Currently not used.  If used it would 
        /// be for distiguishing between different resource types.
        /// For example, there might be text resources, or image url resources
        /// so classkey would create some containment for like items.
        /// </summary>
        public virtual ResourceKey ResourceKey { get; set; }

        public int ResourceKeyID { get; set; }

        /// <summary>
        /// Gets the resource id that is used when specifying 
        /// a localization resource in code.
        /// </summary>
        /// <value>The resource id.</value>
        public virtual string Name { get { return ResourceKey.Name; } }
        /// <summary>
        /// Gets the name of the class key.
        /// </summary>
        /// <value>The name of the class key.</value>
        public virtual string ClassKeyName { get { return ResourceKey.ClassKey.ClassKeyName; } }
        /// <summary>
        /// Gets the culture associated with this resource text.
        /// </summary>
        /// <value>The culture.</value>
        public virtual ResourceCulture Culture { get; set; }

        public int ResourceCultureID { get; set; }

        /// <summary>
        /// Gets or Sets the value of the resource text for this resource key.
        /// </summary>
        public virtual string Value { get; set; }
        public virtual string Commnet { get { return ResourceKey.Comment; } }
        /// <summary>
        /// Gets or sets a value indicating whether this instance is translated.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is translated; otherwise, <c>false</c>.
        /// </value>
        public virtual bool IsTranslated { get; set; }

        #endregion
    }
}
